package com.ruicar.afs.cloud.risk.api.dto.tortoise.notice;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import com.ruicar.afs.cloud.risk.api.enums.tortoise.GwtTortoiseFlowType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description
 * @Author Peng Jinbo
 * @Date 2020/07/31 19:45
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TortoisePrevApproveNoticeInfo implements Serializable {

    /**
     * 标识
     * 1：二手车预审
     * 2：多品预审（新车）
     */
    @JSONField(serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    private GwtTortoiseFlowType type;

    /**
     * Result
     * 二手车预审结果 1：通过 0：拒绝
     * 多品预审结果 A、B、C、D等级信息
     */
    private String result;

    /**
     * Price limit
     * 定价额度
     */
    private BigDecimal priceLimit;

    /**
     * Refuse reason
     * 二手车预审拒绝原因
     */
    private String refuseReason;

    /**
     * Prev approve date
     * 预审时间“yyyy-MM-dd”
     */
    @JSONField(name = "prevApproveDate",format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date prevApproveDate;

}
